home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 2 / LSD and 17bit Compendium Deluxe - Volume II.iso / a / prog / asmsrc / tangosources.lha / misc_sources / bootpic.s next >
Encoding:
Text File  |  2008-06-03  |  5.1 KB  |  217 lines

  1. *****************************************************************************
  2. *                                BOOT PICTURE                                *
  3. *    CODED BY TANGO/XENTRIX                                                    *
  4. *                                                                            *
  5. *****************************************************************************
  6.     
  7.     section copperbars,code_c
  8.     opt c-
  9.     incdir    df1:
  10.     include    gamemacros
  11.  
  12.  
  13. *****************************************************************************
  14. *                    KILL O/S AND CALL ROUTINES AND TEST MOUSE                *
  15. *****************************************************************************
  16.  
  17.     killsys
  18.     
  19.     clr.l    delay
  20.     clr.l    flag
  21.     
  22.     move.l    #$70000,a0
  23.     move.l    #3000,d7
  24. loop:
  25.     clr.l    (a0)+
  26.     dbf        d7,loop
  27.     move.l    #newcopper,$dff080
  28.     lea        custom,a5
  29.     bsr        blitpic
  30. mouse:
  31.     cmp.b    #$ff,$dff006
  32.     bne.s    mouse
  33.     bsr        doform
  34.     bsr        test_exit
  35.     tst.l    flag
  36.     bne.s    exit
  37.     btst    #6,$bfe001
  38.     bne.s    mouse
  39. exit:
  40.     ressys
  41.     clr.l    d0
  42.     rts
  43.  
  44.  
  45. *****************************************************************************
  46. *                SEE IF ITS TIME TO EXIT(EVEN IF MOUSE AINT PRESSED!)        *
  47. *****************************************************************************
  48.  
  49. test_exit:
  50.     cmp.l    #300,delay            ; test delay count
  51.     beq.s    enter_cli
  52.     add.l    #1,delay            ; add to delay
  53.     rts
  54. enter_cli:
  55.     bset    #1,flag                ; set flag
  56.     rts
  57.     
  58.         
  59. *****************************************************************************
  60. *                                BLIT PICTURE                                *
  61. *****************************************************************************
  62.  
  63. blitpic:
  64.     lea        $70000,a0
  65.     add.l    #40*100,a0                    ; mid screen
  66.     lea        pic(pc),a1
  67.     move.w    #0,bltamod(a5)
  68.     move.w    #0,bltdmod(a5)
  69.     move.l    a1,bltapth(a5)
  70.     move.l    a0,bltdpth(a5)
  71.     move.l    #-1,bltafwm(a5)
  72.     move.l    #$09f00000,bltcon0(a5)
  73.     blitwait
  74.     move.w    #16<<6!20,bltsize(a5)
  75.     rts
  76.     
  77.                                                                                                                                                                     
  78. *****************************************************************************
  79. *                            BLIT THE COPPER BARS                            *
  80. *****************************************************************************
  81.  
  82. blitbar:
  83.     lea        coltab(pc),a1
  84.     lea        dest+6(pc),a2                ; point to colour 
  85.     lea        bltapth(a5),a3
  86.     lea        bltdpth(a5),a4
  87.     lea        bltsize(a5),a0
  88.     lea        bltcon0(a5),a6
  89.     move.l    #-1,d6
  90.     moveq    #0,d4
  91.     moveq    #6,d5
  92.     add.l    d1,a2                        ; d1 holds position of bar
  93.     blitwait
  94.     move.w    d4,bltamod(a5)
  95.     move.w    d5,bltdmod(a5)                ; 6  (3words to next colour)
  96.     move.l    d6,bltafwm(a5)
  97.     move.l    a1,(a3)                        ; source
  98.     move.l    a2,(a4)                        ; dest
  99.     move.l    #$09f00000,(a6)                ; minterm D=A
  100.     move.w    #32<<6!1,(a0)                ; blitsize
  101.     rts
  102.  
  103.  
  104. *****************************************************************************
  105. *                    MOVE THE COPPER BARS FROM A SINE TABLE                    *
  106. *****************************************************************************
  107.  
  108. doform:
  109.     move.l    sinptr(pc),a2    ; pointer to sine table
  110.     move.l    tabptr(pc),a0    ; pointer to table
  111.     move.w    (a0)+,d7        ; amount of bars
  112. barlooper:
  113.     move.w    (a0)+,d1        ; position in sinetab
  114.     add.w    d1,d1            ; even
  115.     and.w    #$fe,d1
  116.     move.w    (a2,d1),d1        ; got position
  117.     asl.l    #3,d1            ; times by 8 for next line down!
  118.     move.w    (a0)+,d2
  119.     add.w    d2,-4(a0)        ; speed
  120.     save_all
  121.     bsr        blitbar
  122.     return_all
  123.     dbf        d7,barlooper
  124.     rts
  125.  
  126.  
  127. *****************************************************************************
  128. *                        COPPER LIST (JUST A BIG REPEAT!)                    *
  129. *****************************************************************************
  130.  
  131. newcopper:
  132.     cmove    bpl1mod,0
  133.     cmove    bpl2mod,0
  134.     cmove    diwstrt,$2c81
  135.     cmove    diwstop,$2cc1
  136.     cmove    ddfstrt,$38
  137.     cmove    ddfstop,$d0
  138.     cmove    bplcon0,$1200
  139.     cmove    bpl1ptl,$0000
  140.     cmove    bpl1pth,$0007
  141.     cmove    color01,$fff
  142. a    set    80
  143. dest:
  144.     rept    170
  145.     dc.b    a,$09,$ff,$fe
  146.     dc.w    $180,$00            ; CHANGE THIS COL!!!
  147. a    set        a+1
  148.     endr
  149.     dc.w    $ffff,$fffe
  150.     
  151.  
  152. *****************************************************************************
  153. *           COLOURS FOR BAR (NOTE BAR IS 34 LINES, HENCE 34 COLOURS!)        *
  154. *****************************************************************************
  155.  
  156. coltab:
  157.     dc.w    $000,$000,$001,$002,$003,$004,$005,$006,$007
  158.     dc.w    $008,$009,$00a,$00b,$00c,$00d,$00e,$00f
  159.     dc.w    $00e,$00d,$00c,$00b,$00a,$009,$008,$007,$006
  160.     dc.w    $005,$004,$003,$002,$001,$000
  161.  
  162. delay:
  163.     dc.l    0
  164. flag:
  165.     dc.l    0
  166.         
  167.     
  168. *****************************************************************************
  169. *                             BAR FORMATIONS!                                *
  170. *****************************************************************************
  171.  
  172. tabptr:
  173.     dc.l    tab
  174. tab:
  175.     dc.w    10-1                ; no of bars to blit
  176.     dc.w    10,1                ; offset to sine tab and speed
  177.     dc.w    20,1                ; offset to sine tab and speed
  178.     dc.w    30,1
  179.     dc.w    40,1
  180.     dc.w    50,1
  181.     dc.w    60,1
  182.     dc.w    70,1
  183.     dc.w    80,1
  184.     dc.w    90,1
  185.     dc.w    100,1
  186.  
  187.  
  188. *****************************************************************************
  189. *                            THE MEGA SINE TABLE                                *
  190. *****************************************************************************
  191.  
  192. sinptr:    
  193.         dc.l    sintab
  194. sintab:
  195.     dc.w    120,120,120,119,119,118,117,116
  196.     dc.w    115,114,113,111,110,108,106,104
  197.     dc.w    102,100,98,96,93,91,88,86
  198.     dc.w    83,80,77,75,72,69,66,63
  199.     dc.w    60,57,54,51,48,45,43,40
  200.     dc.w    37,34,32,29,27,24,22,20
  201.     dc.w    18,16,14,12,10,9,7,6
  202.     dc.w    5,4,3,2,1,1,0,0
  203.     dc.w    0,0,0,1,1,2,3,4
  204.     dc.w    5,6,7,9,10,12,14,16
  205.     dc.w    18,20,22,24,27,29,32,34
  206.     dc.w    37,40,43,45,48,51,54,57
  207.     dc.w    60,63,66,69,72,75,77,80
  208.     dc.w    83,86,88,91,93,96,98,100
  209.     dc.w    102,104,106,108,110,111,113,114
  210.     dc.w    115,116,117,118,119,119,120,120
  211.     even
  212. sl=*-sintab        
  213.  
  214. pic:
  215.     incbin    gfx/bootpic
  216.     even
  217.